/*
 * Copyright (c) 2012-2014, EpicSaaS Yuan Xin technology Co., Ltd.
 * 
 * All rights reserved.
 */
package com.epicsaas.app.ksdapp.service;

import javax.annotation.Resource;

import com.epicsaas.app.ksdapp.appobject.CartAO;
import com.epicsaas.app.ksdapp.dao.gen.CartGeneratedMapper;
import com.epicsaas.app.ksdapp.entity.gen.CartCriteria;
import com.epicsaas.common.dao.base.BaseGeneratedMapper;
import com.epicsaas.common.service.base.AbstractBaseAOService;
import com.epicpaas.sdk.core.api.ServiceResult;
import com.epicpaas.sdk.core.api.logging.Logger;
import com.epicpaas.sdk.core.api.logging.LoggerFactory;

public class CartService extends AbstractBaseAOService<CartAO, CartCriteria> implements ICartService {

    private static Logger LOG = LoggerFactory.getLogger(CartService.class);

    @Resource
    private CartGeneratedMapper cartGeneratedMapper;

    @Override
    protected BaseGeneratedMapper<CartAO, CartCriteria> getGeneratedMapper() {
        return cartGeneratedMapper;
    }

    @Override
    public ServiceResult<Boolean> save(CartAO entityAO) {
        // TODO Auto-generated method stub
        boolean f = cartGeneratedMapper.insertSelective(entityAO) > 0 ? true : false;
        LOG.info("line 169  insertSelective -> f [%s]", f);
        return new ServiceResult<Boolean>(f);
    }

}
